import Vue from 'vue'
import App from './App.vue'
import Vuex from 'vuex'
import router from './router'
import '@/components/autoRegister'
import ElementUI from 'element-ui'
import './plugins/element.js'
import './assets/css/global.css'
import store from './store'
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from '@/utils/ruoyi';
import directive from './directive' // directive
import plugins from './plugins' // plugins
import Pagination from '@/components/Pagination' // 分页组件



import http from './api'
// import 'default-passive-events'

Vue.use(Vuex)
Vue.use(ElementUI)
Vue.prototype.$http = http
// 全局方法挂载
Vue.prototype.parseTime = parseTime
Vue.prototype.resetForm = resetForm
Vue.prototype.addDateRange = addDateRange
Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.selectDictLabels = selectDictLabels
Vue.prototype.handleTree = handleTree

Vue.use(directive)
Vue.use(plugins)
Vue.component('Pagination', Pagination)

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')
